<template>
  <div>
    <van-nav-bar title="设置">
      <img
        src="~assets/image/arrow_left.png"
        alt=""
        width="20"
        height="20"
        slot="left"
        @click="leftClick"
      />
    </van-nav-bar>
    <div class="ban">
      <p>版本更新</p>
      <p>{{ oemInfo.androidVersion }}</p>
    </div>
    <div class="ban" @click="itemclick">
      <p>关于我们</p>
      <div>
        <img
          src="../../assets/image/arr_rigth.png"
          width="9"
          height="15"
          alt=""
        />
      </div>
    </div>

    <button @click="SignOut">退出登录</button>
  </div>
</template>
<script>
import { queryOemInfoApi } from "network/ApiServe";
export default {
  created() {
    this.brandId = localStorage.getItem("brandId");
  },
  data() {
    return {
      oemInfo: {},
    };
  },
  mounted() {
    this.getOemInfo();
  },
  methods: {
    leftClick() {
      this.$router.back(-1);
    },
    itemclick() {
      this.$router.push("/aboutus");
    },
    getOemInfo() {
      queryOemInfoApi(this.brandId)
        .then((res) => {
          console.log("res:", res);
          if (res.resp_code === "000000") {
            this.oemInfo = res.result;
          }
        })
        .catch((err) => {
          console.log(err);
        });
    },
    SignOut() {
      //   localStorage.removeItem("token");
      var storage = window.localStorage;
      storage.clear();
      this.$router.push("/logindex");
    },
  },
};
</script>
<style  scoped>
.ban {
  background: #fff;
  display: flex;
  justify-content: space-between;
  height: 50px;
  line-height: 50px;
  padding-left: 20px;
  padding-right: 20px;
  font-size: 15px;
  margin-bottom: 1px;
}
button {
  color: #fff;
  background-color: #000;
  width: 80%;
  margin: 50px auto;
  font-size: 15px;
  border-radius: 8px;
  display: block;
  padding: 8px 0 8px 0;
}
</style>